<%@ page language="java" contentType="text/html; charset=utf-8" import="java.util.*"
    pageEncoding="utf-8"%>
<%@ page language="java" import="java.sql.*" import = "ibm.etp.bean.*" import="ibm.etp.test.*"%>
<%@ taglib prefix="s" uri="/struts-tags" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <title>所有员工</title>
  </head>
  <body bgcolor="#EEF2FB">
  <%
  //ResultSet rs = null;
  try{
   //rs = Oracle.doOracle("select * from worker");
   List list = HibernateOracle.doHibernateOr("from Worker"); 
   
 for(int i=0;i<list.size();i++){
	 Worker worker = (Worker)list.get(i);
      out.println("<form action=\"worker.action\" method=\"get\"><table border=\"1\"><tr><th>工号</th><th>用户名</th><th>工资</th><th>是否删除</th></tr>");
  
	 
	  out.print("<tr><td>"+worker.getWid()+"</td>");
	  out.print("<td>"+worker.getUsername()+"</td>");
	  out.print("<td>"+worker.getSalary()+"</td><td><input name=\"wid\" type=\"checkbox\" value=\""+worker.getWid()+"\"/></td></tr>");  
  }
  }catch(Exception e){
	  e.printStackTrace();
  }finally{
	  
   out.println("</table><br><input type=\"submit\" value=\"删除\"/></s:form>");
	
  }
  %> 
</body>
</html>
